﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Diagnostics;

using EventMonitor.EventLogs;


namespace EventMonitor.Windows
{
	/// <summary>
	/// Interaction logic for EventLogWindow.xaml
	/// </summary>
	public partial class EventLogWindow : Window
	{
		#region " Constructors "

		public EventLogWindow()
		{
			InitializeComponent();
		}

		#endregion



		#region " Event Handlers "

		private void EventLogSelect_Click(object sender, RoutedEventArgs e)
		{
			if (!this.IsInitialized)
				return;

			EventLog log = this.EventLogName.SelectedItem as EventLog;
			if (log == null)
				return;

			this.EventsList.ItemsSource = WindowsEventLog.GetEventLogEntries(log);
		}

		#endregion
	}
}
